package com.danco.training.zaneuskaya.repository;

import java.util.Date;
import java.util.List;

import org.hibernate.HibernateException;

import com.danco.training.zaneuskaya.domain.Message;
import com.danco.training.zaneuskaya.domain.User;

/**
 * @author Zaneuskaya Aliaksandra
 *
 */
public interface MessageDao extends GenericDao<Message, Integer> {

	public List<Message> findMessagesBySender(User sender)
			throws HibernateException;

	public List<Message> findMessagesByReceiver(User receiver)
			throws HibernateException;

	public List<Message> findMessagesByPeriod(Date from, Date to)
			throws HibernateException;

}
